package org.celery.modules.ticket.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springblade.core.mp.base.BaseEntity;
import java.time.LocalDate;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 订单登记表实体类
 *
 * @author Celery
 * @since 2023-09-23
 */
@Data
@TableName("celery_custom_ticket")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "CustomTicket对象", description = "订单登记表")
public class CustomTicket extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    @JsonSerialize(using = ToStringSerializer.class)
  private Long id;
    /**
     * 店铺id
     */
    @ApiModelProperty(value = "店铺id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long shopId;
    /**
     * 订单号
     */
    @ApiModelProperty(value = "订单号")
    private String ticketNumber;
    /**
     * 出售价格
     */
    @ApiModelProperty(value = "出售价格")
    private BigDecimal salePrice;
    /**
     * 采购价格
     */
    @ApiModelProperty(value = "采购价格")
    private BigDecimal purchasePrice;
    /**
     * 差价
     */
    @ApiModelProperty(value = "差价")
    private BigDecimal differencesPrice;
    /**
     * 利润
     */
    @ApiModelProperty(value = "利润")
    private BigDecimal profit;
    /**
     * 利润率
     */
    @ApiModelProperty(value = "利润率")
    private Double profitRate;
    /**
     * 商家订单号
     */
    @ApiModelProperty(value = "商家订单号")
    private String outTradeNo;
    /**
     * 日期
     */
    @ApiModelProperty(value = "日期")
    @DateTimeFormat(
            pattern = "yyyy-MM-dd"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd"
    )
    private LocalDate date;
    /**
     * 是否退款
     */
    @ApiModelProperty(value = "是否退款")
    private Integer isRefund;
    /**
     * 是否发货
     */
    @ApiModelProperty(value = "是否发货")
    private Integer isSend;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;


}
